package com.yunhe.policyfulfillment.policyful.repository;
import com.yunhe.policyfulfillment.policyful.domain.PolicyApplyMatterStatistics;
import com.yunhe.policyfulfillment.policyful.model.ApprovalStatisticalAnalysis;
import com.yunhe.policyfulfillment.policyful.model.PolicyStatisticsRateVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;

/**
 * @description 申请事项处理统计分析
 * @author misty
 * @date 2021-09-18
 */
@Repository
public interface PolicyApplyMatterStatisticsRepository {

    /**
     * 新增
     * @author misty
     * @date 2021/09/18
     **/
    int createPolicyApplyMatterStatistics(PolicyApplyMatterStatistics policyApplyMatterStatistics);

    /**
     * 新增
     * @author misty
     * @date 2021/09/18
     **/
    int createPolicyApplyMatterStatisticsSelective(PolicyApplyMatterStatistics policyApplyMatterStatistics);

    /**
     * 刪除
     * @author misty
     * @date 2021/09/18
     **/
    int deletePolicyApplyMatterStatisticsByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author misty
     * @date 2021/09/18
     **/
    int updatePolicyApplyMatterStatisticsByPrimaryKey(PolicyApplyMatterStatistics policyApplyMatterStatistics);

    /**
     * 更新
     * @author misty
     * @date 2021/09/18
     **/
    int updatePolicyApplyMatterStatisticsByPrimaryKeySelective(PolicyApplyMatterStatistics policyApplyMatterStatistics);

    /**
     * 根据主键查询
     * @author misty
     * @date 2021/09/18
     **/
    PolicyApplyMatterStatistics searchPolicyApplyMatterStatisticsByPrimaryKey(@Param("id") int id);


    void batchCreatePolicyApplyMatterStatistics(@Param("dataLists") List<PolicyApplyMatterStatistics> dataLists);

    /**
     * @Description 根据月获取政策申请统计
     * @Param String startTime, String endTime
     * @Return List<PolicyStatisticsRateVO>
     * @Date 2021/9/19 9:55
     */
    List<PolicyStatisticsRateVO> getApplyMatterStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * @Description 根据月获取资金发放统计
     * @Param String startTime, String endTime
     * @Return List<PolicyStatisticsRateVO>
     * @Date 2021/9/19 10:48
     */
    List<PolicyStatisticsRateVO> getFundReleaseStatistics(@Param("startTime") String startTime, @Param("endTime") String endTime);

    /**
     * @Description 按月获取审批统计分析
     * @Param String startTime, String endTime, String orgType
     * @Return List<ApprovalStatisticalAnalysis>
     * @Date 2021/9/20 9:24
     */
    List<ApprovalStatisticalAnalysis> getApplyProcessCount(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("orgType") String orgType);
}